Skip to content

Conversation

@antoyo
Copy link
Contributor

@antoyo antoyo commented Nov 26, 2025

r? @Kobzol

@rustbot
Copy link
Collaborator

rustbot commented Nov 26, 2025

This PR changes how GCC is built. Consider updating src/bootstrap/download-ci-gcc-stamp.

This PR modifies src/bootstrap/src/core/config.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Nov 26, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 26, 2025

Kobzol is not on the review rotation at the moment.
They may take a while to respond.

@antoyo antoyo marked this pull request as draft November 26, 2025 14:04
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 26, 2025
@antoyo
Copy link
Contributor Author

antoyo commented Nov 26, 2025

@Kobzol: I'm sending this PR to gather some feedback from you or others.

How can I add tests for this new bootstrap config?
Where should I document this new config?

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Nov 28, 2025

☔ The latest upstream changes (presumably #149348) made this pull request unmergeable. Please resolve the merge conflicts.

@antoyo antoyo force-pushed the bootstrap-config/libgccjit-libs-dir branch from 1bf3007 to 2125647 Compare November 28, 2025 16:41
@Kobzol
Copy link
Member

Kobzol commented Dec 6, 2025

I will focus on #149426 first, as I think that we should first deal with the compiler/cg_gcc side of things, before we go modify bootstrap.

Copy link
Member

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense, although the implementation needs some changes. I'd be happy to play with this if you don't want to deal with doing these bootstrap changes.

View changes since this review

@bors
Copy link
Collaborator

bors commented Dec 9, 2025

☔ The latest upstream changes (presumably #149426) made this pull request unmergeable. Please resolve the merge conflicts.

@antoyo antoyo force-pushed the bootstrap-config/libgccjit-libs-dir branch from 3368381 to 3541668 Compare December 11, 2025 20:16
@rustbot rustbot added the A-rustc-dev-guide Area: rustc-dev-guide label Dec 11, 2025
@antoyo antoyo force-pushed the bootstrap-config/libgccjit-libs-dir branch from 7eb0416 to dc178b5 Compare December 11, 2025 21:02
@Kobzol
Copy link
Member

Kobzol commented Dec 12, 2025

I refactored the code a bit to more explicitly model that we have multiple target libgccjit dylibs per host, and also to enable both downloading from CI and using prebuilt libgccjit.so files (so that people don't also have to build their x64 libgccjit.so from scratch). Please let me know if it makes sense to you.

@rust-log-analyzer

This comment has been minimized.

@antoyo
Copy link
Contributor Author

antoyo commented Dec 12, 2025

Please let me know if it makes sense to you.

This commit makes sense to me.
For the other commit, I do not understand bootstrap enough to understand what's happening here. Would that commit help keep the m68k libgccjit.so file that was deleted? Do you want me to try to cross-compile rustc locally with that commit?

@Kobzol
Copy link
Member

Kobzol commented Dec 12, 2025

Do you want me to try to cross-compile rustc locally with that commit?

If you already have it prepared, yeah, you could try it. Although CI failed, so maybe there's something else wrong.

@antoyo
Copy link
Contributor Author

antoyo commented Dec 12, 2025

If you already have it prepared, yeah, you could try it. Although CI failed, so maybe there's something else wrong.

Good. I try that right away.

@antoyo
Copy link
Contributor Author

antoyo commented Dec 12, 2025

If you already have it prepared, yeah, you could try it. Although CI failed, so maybe there's something else wrong.

The command finished running and the issue with the m68k libgccjit.so file being deleted still seems there. Any ideas of how to fix this? Do the steps I posted above give you any hint?

@rust-bors

This comment was marked as outdated.

@matthiaskrgr
Copy link
Member

@bors try jobs=dist-x86_64-illumos

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Dec 15, 2025
…=<try>

Bootstrap config: libgccjit libs dir

try-job: dist-x86_64-illumos
@rust-bors
Copy link

rust-bors bot commented Dec 15, 2025

💔 Test for 3199702 failed: CI. Failed jobs:

@matthiaskrgr
Copy link
Member

lol
@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 15, 2025
Comment on lines +201 to +211
# ```
# <libgccjit-libs-dir>
# ├── m68k-unknown-linux-gnu
# │ └── m68k-unknown-linux-gnu
# │ └── libgccjit.so
# └── x86_64-unknown-linux-gnu
# ├── m68k-unknown-linux-gnu
# │ └── libgccjit.so
# └── x86_64-unknown-linux-gnu
# └── libgccjit.so
# ```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe python does not like these?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to add encoding="utf-8" to the call to open?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's try it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's try it.

@rust-log-analyzer

This comment has been minimized.

@antoyo
Copy link
Contributor Author

antoyo commented Dec 15, 2025

@bors try jobs=dist-x86_64-illumos

rust-bors bot added a commit that referenced this pull request Dec 15, 2025
…=<try>

Bootstrap config: libgccjit libs dir

try-job: dist-x86_64-illumos
@rust-bors

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Dec 15, 2025

☀️ Try build successful (CI)
Build commit: f6dcb15 (f6dcb15fdb06413a99c240fdf415cf1b6fc53299, parent: 0160933b1dd9547d46542b0ceedda00c37890c6d)

@antoyo
Copy link
Contributor Author

antoyo commented Dec 15, 2025

@Kobzol: I'll let you approve the new change. It makes the job pass.

@Kobzol
Copy link
Member

Kobzol commented Dec 15, 2025

@bors r+ rollup=never

@bors
Copy link
Collaborator

bors commented Dec 15, 2025

📌 Commit b3c1dff has been approved by Kobzol

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 15, 2025
@bors
Copy link
Collaborator

bors commented Dec 15, 2025

⌛ Testing commit b3c1dff with merge cec7008...

@bors
Copy link
Collaborator

bors commented Dec 16, 2025

☀️ Test successful - checks-actions
Approved by: Kobzol
Pushing cec7008 to main...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 16, 2025
@bors bors merged commit cec7008 into rust-lang:main Dec 16, 2025
13 checks passed
@rustbot rustbot added this to the 1.94.0 milestone Dec 16, 2025
@antoyo antoyo deleted the bootstrap-config/libgccjit-libs-dir branch December 16, 2025 02:25
@github-actions
Copy link
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 21ff67d (parent) -> cec7008 (this PR)

Test differences

Show 2 test diffs

2 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard cec70080fd441d16e9fb08a0d1d1a04c72d1ed25 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-gnu-llvm-20: 2493.6s -> 5072.3s (+103.4%)
  2. dist-apple-various: 4748.7s -> 4019.7s (-15.4%)
  3. x86_64-gnu-llvm-21-2: 5569.3s -> 4865.1s (-12.6%)
  4. dist-aarch64-llvm-mingw: 6423.4s -> 5702.4s (-11.2%)
  5. aarch64-msvc-1: 7770.8s -> 6934.8s (-10.8%)
  6. pr-check-2: 2611.9s -> 2337.4s (-10.5%)
  7. aarch64-gnu-llvm-20-2: 3158.8s -> 2836.5s (-10.2%)
  8. dist-x86_64-apple: 8086.1s -> 7378.7s (-8.7%)
  9. i686-gnu-nopt-1: 7041.0s -> 7649.5s (+8.6%)
  10. x86_64-gnu-llvm-20-2: 5618.0s -> 5199.5s (-7.4%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (cec7008): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (secondary 4.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.1% [4.1%, 4.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 479.832s -> 479.175s (-0.14%)
Artifact size: 390.26 MiB -> 390.21 MiB (-0.01%)

@bors bors mentioned this pull request Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-rustc-dev-guide Area: rustc-dev-guide A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants